package com.ai.service.security;

import com.ai.common.CommonResponse;
import com.ai.entity.Industry.IndustryMQEntity;
import com.ai.entity.security.SysUser;
import com.ai.entity.security.page.UserPage;
import com.ai.model.param.ModifyUserPasswordParam;
import com.ai.model.param.SysUserParam;
import com.ai.model.param.UserParam;
import com.ai.model.vo.SysUserModel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author chen
 * @since 2023-04-04 19:46:07
 */
public interface ISysUserService extends IService<SysUser> {

    /**
     * 根据用户名查询用户
     *
     * @param userName
     * @return
     */
    SysUser selectByAccount(String userName);

    /**
     * 根据用户名查询用户
     *
     * @param userName
     * @return
     */
    SysUser selectByName(String userName);



    CommonResponse<String> add(SysUserParam user);

    CommonResponse<String> deleteUser(Integer user);

    CommonResponse<String> updateUser(SysUserParam sysUser);

    CommonResponse login(UserParam userParam);

    IPage<SysUserModel> getList(UserPage page);

    CommonResponse getUserInfoVo(String id);

    CommonResponse<String> modifyPassword(ModifyUserPasswordParam passwordParam);

    /**
     * 检测到mq更新用户操作消息
     * @param industryMQEntity 具体消息内容
     * @return
     */
    Boolean rocketMqUserUpdate(IndustryMQEntity industryMQEntity);

    /**
     * 检测到mq新增用户操作消息
     * @param industryMQEntity 具体消息内容
     * @return
     */
    Boolean rocketMqUserAdd(IndustryMQEntity industryMQEntity);

    /**
     * 检测到mq删除用户操作消息
     * @param industryMQEntity 具体消息内容
     * @return
     */
    Boolean rocketMqUserDel(IndustryMQEntity industryMQEntity);
}
